﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Yz.Base;

namespace Yz.Model.Entities
{
    /// <summary>
    /// 用户信息表
    /// </summary>
    public class User : BaseEntity
    {
        /// <summary>
        /// 用户名（不作为登录名）
        /// </summary>
        [MaxLength(15)]
        [Description("登录名")]
        public string UserName { get; set; } = "";
        /// <summary>
        /// 密码
        /// </summary>
        [MaxLength(60)]
        [Description("登录密码")]
        public string Password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        //[MaxLength(11)] 
        [Description("手机号")]
        public string Telephone { get; set; }
        /// <summary>
        /// qq
        /// </summary>
        [MaxLength(15)]
        [Description("QQ")]
        public string QQ { get; set; }
        /// <summary>
        /// 用户状态
        /// </summary>
        [Description("用户状态")]
        public StatusType StatusType { get; set; } = StatusType.Enable;
        /// <summary>
        /// 用户头像
        /// </summary>
        [MaxLength(300)]
        [Description("用户头像")]
        public string UserPhoto { get; set; } = "";
        /// <summary>
        /// 创建时间
        /// </summary> 
        public DateTime CreateTime { get; set; } = DateTime.Now;
    }
}
